1. Field of the Invention
The present invention relates to an image encoding apparatus and, more particularly, to an image encoding apparatus for encoding an image on a divided block unit basis and a control method of such an image encoding apparatus.
2. Description of the Related Art
In the related arts, a digital video camera is well-known as a camera-integrated moving image recording apparatus for compression encoding and recording moving image data which is obtained by photographing an object. In recent years, a recording medium for recording moving image data has been changing from a magnetic tape in the related art to a disk-type medium, a semiconductor memory, or the like having high convenience such as random access performance or the like. As a compression method, an MPEG2 method which is capable of achieving a compression at a high compression rate by using a motion prediction between frames is generally used. Further, in recent years, an H.264 method which is capable of achieving a compression at a higher compression rate is used. In the H.264 method or the like, such a standard that a macro block is finely divided into sub macro blocks and a motion compensation can be performed has been defined.
Therefore, a method of adaptively determining a block size which is to be used, in accordance with a feature or the like of an image has been disclosed in the Japanese Patent Application Laid-Open No. H09-130801 (Patent Literature 1). A method of adaptively determining a block size in accordance with camera information has been disclosed in the Japanese Patent Application Laid-Open No. 2006-254370 (Patent Literature 2).
However, in an encoding method of the next generation whose standardization has been being progressed in recent years, a method whereby a size of encoding block to which a quantization coefficient of an image is decided can be adaptively changed is being examined.
If the encoding block size is adaptively changed, a block division can be performed in accordance with a feature or the like of an image and an encoding efficiency and picture quality can be improved.
However, since the quantization coefficient can be determined every encoding block size, a code amount error serving as a difference between a target code amount and a generated code amount of each block increases, so that a deterioration in picture quality is caused.